<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<!-- source http://www.scnoob.com More templates http://www.scnoob.com/moban -->
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>上级用户</title>

    <link rel="stylesheet" type="text/css" th:href="@{/assets/css/bootstrap.min.css}">

    <link rel="stylesheet" type="text/css" th:href="@{/assets/fonts/line-icons.css}">

    <link th:href="@{/assets/plugins/datatables/dataTables.bootstrap4.min.css}" rel="stylesheet" type="text/css" />
    <link th:href="@{/assets/plugins/datatables/buttons.bootstrap4.min.css}" rel="stylesheet" type="text/css" />

    <link th:href="@{/assets/plugins/datatables/responsive.bootstrap4.min.css}" rel="stylesheet" type="text/css" />

    <link rel="stylesheet" type="text/css" th:href="@{/assets/css/main.css}">

    <link rel="stylesheet" type="text/css" th:href="@{/assets/css/responsive.css}">
</head>
<body>
<div class="app header-default side-nav-dark">
    <div class="layout">
        <div class="page-container pl-0">
            <div class="main-content">
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-12">
                            <div class="card">
                                <div class="card-header border-bottom">
                                    <h4 class="card-title">上级用户列表</h4>
                                </div>
                                <div class="card-body">
                                    <div class="table-responsive">
                                        <table id="datatable" class="table table-bordered" style="width: 100%;">
                                            <thead>
                                            <tr>
                                                <th class="text-center">手机号码</th>
                                                <th>用户名</th>
                                                <th>真实姓名</th>
                                                <th class="text-center">邮箱地址</th>
                                                <th class="text-center">支付宝收款人</th>
                                                <th class="text-center">支付宝收款人账号</th>
                                                <th class="text-center">微信收款人</th>
                                                <th class="text-center">微信收款人账号</th>
                                                <th class="text-center">开户行</th>
                                                <th class="text-center">收款人</th>
                                                <th class="text-center">收款账户</th>
                                                <th class="text-center">最后登录时间</th>
                                            </tr>
                                            </thead>
                                            <!--<tbody>
                                            <tr th:if="${user != null}" th:each="user,stat:${usersList}">
                                                <td th:text="${user.phone}"></td>
                                                <th scope="row" th:text="${user.username}"></th>
                                                <td th:text="${user.realName}"></td>
                                                <td th:text="${user.email}"></td>
                                                <td th:text="${user.alipayName}"></td>
                                                <td th:text="${user.alipayNum}"></td>
                                                <td th:text="${user.wechatName}"></td>
                                                <td th:text="${user.wechatNum}"></td>
                                                <td th:text="${user.backcardName}"></td>
                                                <td th:text="${user.bankcardName}"></td>
                                                <td th:text="${user.bankcardNum}"></td>
                                                <td th:text="${user.lastLogin}"></td>
                                            </tr>

                                            </tbody>-->
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>



            </div>

        </div>
    </div>
</div>

    <div id="preloader">
        <div class="loader" id="loader-1"></div>
    </div>

    <button value="添加"><a href="/admin/user/add"></a></button>


    <script th:src="@{/assets/js/jquery-min.js}"></script>
    <script th:src="@{/assets/js/popper.min.js}"></script>
    <script th:src="@{/assets/js/bootstrap.min.js}"></script>
    <script th:src="@{/assets/js/jquery.app.js}"></script>
    <script th:src="@{/assets/js/main.js}"></script>

    <script th:src="@{/assets/plugins/datatables/jquery.dataTables.min.js}"></script>
    <script th:src="@{/assets/plugins/datatables/dataTables.bootstrap4.min.js}"></script>

    <script th:src="@{/assets/plugins/datatables/dataTables.buttons.min.js}"></script>
    <script th:src="@{/assets/plugins/datatables/buttons.bootstrap4.min.js}"></script>
    <script th:src="@{/assets/plugins/datatables/jszip.min.js}"></script>
    <script th:src="@{/assets/plugins/datatables/pdfmake.min.js}"></script>
    <script th:src="@{/assets/plugins/datatables/vfs_fonts.js}"></script>
    <script th:src="@{/assets/plugins/datatables/buttons.html5.min.js}"></script>
    <script th:src="@{/assets/plugins/datatables/buttons.print.min.js}"></script>
    <script th:src="@{/assets/plugins/datatables/buttons.colVis.min.js}"></script>

    <script th:src="@{/assets/plugins/datatables/dataTables.responsive.min.js}"></script>
    <script th:src="@{/assets/plugins/datatables/responsive.bootstrap4.min.js}"></script>

    <script th:src="@{/assets/js/datatables.init.js}"></script>

    <script type="text/javascript" >
        $("#datatable").DataTable({
            "oLanguage": {
                "sUrl": "/assets/page_zh_CN.json"
            },
            serverSide: true, //开启后端模式
            bSort:false,
            // searching: false,  //禁用原生搜索
            // "pageLength": 10,         //初始化显示几条数据
            "sAjaxSource": "/admin/user/lowerAndReferList?type=referUser",
            "fnServerData": function (sSource, aoData, fnCallback) {
                $.ajax({
                    "dataType": 'json',
                    "type": "POST",
                    "url": sSource,
                    "data": {
                        aoData: JSON.stringify(aoData)
                    },
                    "success": fnCallback
                });
            },
            "bDeferRender": true,// 是否启用延迟加载：当你使用AJAX数据源时，可以提升速度。默认值：False
            //列表表头字段
            "aoColumns": [
                {"mData": "phone","width":"9%","orderable" : false},
                {"mData": "username","width":"8%","orderable" : false},
                {"mData": "realname","width":"8%","orderable" : false},
                {"mData": "email","width":"9%","orderable" : false},
                {"mData": "alipayname","width":"7%","orderable" : false},
                {"mData": "alipaynum","width":"9%","orderable" : false},
                {"mData": "wechatname","width":"7%","orderable" : false},
                {"mData": "wechatnum","width":"8%","orderable" : false},
                {"mData": "backcardname","width":"7%","orderable" : false},
                {"mData": "bankcardname","width":"8%","orderable" : false},
                {"mData": "bankcardnum","width":"9%","orderable" : false},
                {"mData": "lastlogin","width":"11%","orderable" : false}
            ]
        });
    </script>
</body>

</html>